<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增库存盘点')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-kucunpandianTest-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">仓库名称：</label>
                <div class="col-sm-8">
                    <select name="cangkuName" id="cangkuName" class="form-control"
                            th:with="type=${@cangkuServiceImpl.selectCangkuAll()}" required>
                        <option th:each="lists : ${type}"
                                th:if="${lists.getCangkuName().equals(session.name4user)
                                        || session.QuanXian=='1'||session.QuanXian==1}"
                                th:text="${lists.getCangkuName()}"
                                th:value="${lists.getCangkuName()}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商品类别：</label>
                <div class="col-sm-8">
                    <select name="shangpinLeibie" class="form-control"
                            th:with="type=${@shangpinxinxiServiceImpl.selectGoods4LeiBie()}" required>
                        <option value=""></option>
                        <option th:each="lists : ${type}"
                                th:text="${lists.getShangpinLeibie()}"
                                th:value="${lists.getShangpinLeibie()}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">商品编号：</label>
                <div class="col-sm-8">
                    <input name="goodId" class="form-control" type="text">
                </div>
            </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label is-required">商品名称：</label>
                            <div class="col-sm-8">
                                <input name="goodName" class="form-control" type="text" required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">商品规格：</label>
                            <div class="col-sm-8">
                                <input name="goodSpecification" class="form-control" type="text">
                            </div>
                        </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">商品库存：</label>
                <div class="col-sm-8">
                    <input name="kuncun" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "kucunpandian/kucunpandianTest"
        $("#form-kucunpandianTest-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-kucunpandianTest-add').serialize());
            }
        }
    </script>
</body>
</html>